using System;
using System.Threading.Tasks;

namespace DealerPlatform.Common.RedisModule;

public partial class RedisWorker
{
    public void SetString(string key, string value, TimeSpan ts)
    {
        redisCore.Db.StringSet(key, value, ts);
    }
    
    public async Task SetStringAsync(string key, string value, TimeSpan ts)
    {
        await redisCore.Db.StringSetAsync(key, value, ts);
    }
    
    public string GetString(string key)
    {
        return redisCore.Db.StringGet(key);
    }
    
    public async Task<string> GetStringAsync(string key)
    {
        return await redisCore.Db.StringGetAsync(key);
    }
}